<template>
	<view class="con-box">
		<view class="box">
			<view class="box-left">
				<view class="title-s">
					请您先登录或注册再进行操作
				</view>
			</view>
			<view
			class="arrow"
			@click="tologin"
			>
				立即登录
			</view>
		</view>
	</view>
</template>

<script>
	//微信公共登录方法
	import commlogin from '../../../util/wxlogin.js'
	import commpasslogin from '../../../util/passwxlogin.js'
	export default{
		data(){
			return{
				userinfo: {},
				showgetMobile: null,
			}
		},
		methods:{
			tologin(){
				// uni.navigateTo({
				// 	url: "/subunimodules/uni-id-pages/pages/login/login-withoutpwd"
				// })
        this.$Router.push({
          path:'/pages/public/login'
        })
			},
			onGetPhoneNumber(e) {
				let that = this
				commlogin.getCode(e.detail.iv, e.detail.encryptedData)
        .then(res=>{
				this.showgetMobile = false
				  uni.showToast({
					  title:'登录成功',
					  icon:'none',
				  })
				  this.$emit('loginsuccess')
				})
        .catch((error)=>{})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.con-box{
		padding: 0 10rpx 0 10rpx;
		position: fixed;
		bottom: 130rpx;
		left: 0;
		width: 100%;
		// height: 200rpx;
		z-index: 9999 !important;
		.box{
			display: flex;
			align-items: center;
			justify-content: space-between;
			width: 100%;
			height: 100rpx;
			border-radius: 50rpx;
			background: rgba(255, 255, 255, .9);
			 box-shadow: 0rpx 0rpx 20rpx rgba(0, 0, 0, .2);
			 z-index: 9999 !important;
      padding-left: 20rpx;
			 .box-left{
				 display: flex;
				 flex-direction: column;
				 margin-left: 20rpx;
				 .title{
					 font-size: 30rpx;
				 }
				 .title-s{
					 font-size: 25rpx;
					 color: #b2b2b2;
				 }
			 }
			 .arrow{
				 border: 0 !important;
				 margin-right: 50rpx;
				 width: 180rpx;
				 height: 50rpx;
				 text-align: center;
				 line-height: 50rpx;
				 color: #fff;
				 font-size: 28rpx;
         border-radius: 30rpx;
				 background: linear-gradient(90deg,#e5a950,#fb7a5b);
			 }
		}
	}
</style>